package com.zhang.servicemap.controller;

import com.zhang.internalcommon.dto.ResponseResult;
import com.zhang.servicemap.service.ServiceFromMapService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 类功能描述
 *
 * @author Kye
 * @date 2025-04-15
 */
@RestController
@RequestMapping("/service")
public class ServiceController {

	@Autowired
	private ServiceFromMapService serviceFromMapService;

	/**
	 * 创建服务
	 * @param name
	 * @return
	 */
	@PostMapping("/add")
	public ResponseResult add(String name){
		ResponseResult result = serviceFromMapService.add(name);
		return result;
	}
}
